package com.be.beadmin.product.Util;

import com.be.beadmin.common.utils.ResultModel;
import com.be.beadmin.product.dto.output.ProductExecEx;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description:
 * @author: Jiaming Zheng
 * @Date: Create in 13:41 2023/7/14
 * @Modified By:
 **/
public class CosResultModel extends ResultModel {

    private static CosResultModel cosResultModel = new CosResultModel();
    public static ResultModel success(String message,int currentState) {
        ResultModel success =  ResultModel.success(message);
//        List<ProductExecEx> data = new ArrayList<>();
//        data.add(new ProductExecEx(currentState));
        success.setData(currentState);
        return success;
    }

    public static ResultModel error(int code,String message,int currentState) {
        ResultModel error = ResultModel.error(code, message);
//        List<ProductExecEx> data = new ArrayList<>();
//        data.add(new ProductExecEx(currentState));
        error.setData(currentState);
        return error;
    }
}
